#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define LEN 999

typedef struct Arr {
    int n;
    char arr[0];
}Arr;

//回文
int isParlindrome (char *str) {
    int left = 0;
    int right = strlen(str) - 1;
    for (int i = 0; left + i < right - i; i++) {
        if (str[left + i] != str[right - i]) {
            return 0;
        }
    }
    return 1;
}

int main() {
    int len = LEN;
    Arr *arr = (Arr *) malloc(sizeof(Arr) + len * sizeof(char));
    if (arr == NULL) {
        perror("堆区开辟空间失败:");
    }
    scanf("%s", arr->arr);
    if (isParlindrome(arr->arr) == 1) {
        printf("YES");
    } else {
        printf("NO");
    }
    free(arr);
    arr = NULL;
    return 0;
}